package com.icangya.DAO.impl;

import com.icangya.DAO.IFbAwardDetailsDAO;
import com.icangya.domain.FbAwardDetails;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public class FbAwardDetailsDAOImpl extends  BaseDAO<FbAwardDetails> implements IFbAwardDetailsDAO {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public FbAwardDetails getAwardDetailsByAwardId(long awardId) {
        String hql="FROM FbAwardDetails um where um.awardId=? ";
        List<FbAwardDetails> list= (List<FbAwardDetails>) getHibernateTemplate().find(hql,awardId);
        if(list.size()>0)
            return list.get(0);

        return null;
    }
}
